﻿(function () {
    try {
        //#region Static

        var _Class = new Class();
        _Class.Base = function(options, Instance) {
            try {
                Instance = Common.ExtendOptions(Instance, options);

                if (!options)
                    options = {};

                //#region Properties

                Instance.Public = {};

                //#endregion

                //#region Methods

                Instance.Base = function (options, instance) {
                    try {
                        instance = Common.ExtendOptions(instance, options);

                        instance.Public = {};

                        return instance;
                    }
                    catch (Error) { Common.ShowError(Error); }
                    return null;
                };

                //#endregion

                return Instance;
            }
            catch(Error) { Common.ShowError(Error); }
            return null;
        }
        _Class.Constructor = function(options) {
            try {
                var instance = new Class.Base(options);

                /* Public. */
                Common.ExtendObject(classBase.Public, this);
            }
            catch (Error) { Common.ShowError(Error); }
        };

        //#endregion

        window.Class = Class.Constructor;
    }
    catch (Error) { Common.ShowError(Error); }
})();